package com.neusoft.classCH6;

import org.omg.PortableInterceptor.AdapterManagerIdHelper;

/*
 * 5、定义两个类，描述如下： [必做题]
 * 5.1定义一个人类Person：
 * 5.1.1定义一个方法sayHello()，可以向对方发出问候语“hello,my name is XXX”
 * 5.1.2有三个属性：名字、身高、体重
 * 5.2定义一个PersonCreate类：
 * 5.2.1创建两个对象，分别是zhangsan，33岁，1.73；lishi，44，1.74
 * 5.2.2分别调用对象的sayHello()方法。
 *
 */
 
public class Person {
	//属性
	private String name;
	private double height;
	private double weight;
	private int age; 
	//重载构造方法
	public Person() {}
	/**
	 * 
	 * @param name0
	 * @param age0
	 */
	public Person(String name0,int age0) {
		name=name0;
		age=age0;
	}
	
	/**
	 * 
	 * @param name0
	 * @param age0
	 * @param height0
	 */
	public Person(String name0,int age0,double height0) {
		name=name0;
		age=age0;
		height= height0;
	}
	/**
	 * 
	 * @param name0
	 * @param age0
	 * @param height0
	 * @param weight0
	 */
	public Person(String name0,int age0,double height0,double weight0) {
		name=name0;
		age=age0;
		height= height0;
		weight=weight0;
	}
	
	
	
	
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public double getHeight() {
		return height;
	}
	public void setHeight(double height) {
		this.height = height;
	}
	public double getWeight() {
		return weight;
	}
	public void setWeight(double weight) {
		this.weight = weight;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public void sayHello() {
		System.out.println("My name is "+name);
	}

}
